<script setup lang="ts">
import type { CategoryItem } from '/@/types/home'

// 定义 props 接收数据
defineProps<{
    list: CategoryItem[]
}>()

const details = (url: string) => {
 
	uni.navigateTo(
	{
		url:`/pages/${url}/${url}`
	}
	)
}
</script>

<template>
    <view class="category">
        <view class="category-item" @tap="details('signup')">
            <image class="icon" src="https://shai.oss-cn-beijing.aliyuncs.com/dog.png"></image>
            <text class="text">在线签约</text>
        </view>
        <view class="category-item" @tap="details('payment')">
            <image class="icon" src="https://shai.oss-cn-beijing.aliyuncs.com/rocket13.png"></image>
            <text class="text">缴费</text>
        </view>
        <view class="category-item" @tap="details('自营房源')">
            <image class="icon" src="https://shai.oss-cn-beijing.aliyuncs.com/house.png"></image>
            <text class="text">自营房源</text>
        </view>
        <navigator
            class="category-item"
            open-type="switchTab"
            hover-class="none"
            url="/pages/apartmentlist/apartmentlist"
        >
            <image class="icon" src="https://shai.oss-cn-beijing.aliyuncs.com/rocket01.png"></image>
            <text class="text">地图找房</text>
        </navigator>
    </view>
</template>

<style lang="scss">
@import '../styles/category.scss';
</style>
